package com.ssyc.gsk_teacher.activity;

import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.ssyc.common.base.BaseActivity;
import com.ssyc.gsk_teacher.R;

/**
 * 学生接收到生日祝福的通知点击需要跳转的界面
 * Created by Administrator on 2018/7/30 0030.
 */

public class TeacherStudentAcceptBirthdayActivity extends BaseActivity implements View.OnClickListener {

    private ImageView ivBack;

    private TextView tvContent;

    @Override
    protected boolean isNeedShowTitle() {
        return false;
    }

    @Override
    protected String setTitleText() {
        return null;
    }

    @Override
    protected int getContentLayout() {
        return R.layout.teacher_activity_accept_birthday;
    }

    @Override
    protected void init() {
        showContent();

        //初始化视图
        initView();

        //获取发送的生日祝福的文字
        initIntent();
    }


    /**
     * 初始化视图
     */
    private void initView() {
        ivBack = findViewById(R.id.iv_back);
        ivBack.setOnClickListener(this);
        tvContent = findViewById(R.id.tv_msg);
    }


    /**
     * 获取祝福
     */
    private void initIntent() {
        String content = getIntent().getStringExtra("birthady");
        if (!TextUtils.isEmpty(content)) {
            tvContent.setText(content);
        }
    }


    /**
     * 点击事件
     *
     * @param view
     */
    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.iv_back) {
            //返回
            finish();
        }

    }
}
